package cn.yunlang.zhangZhongFei.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户表
 *
 * @author ·
 * @since 2025-05-26 14:46:27
 */
@Data
@TableName("t_user")
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "id", hidden = true)
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty(value = "openId", hidden = true)
  @TableField("open_id")
  @JsonIgnore
  private String openId;

  @ApiModelProperty("昵称")
  @TableField("nick_name")
  private String nickName;

  @ApiModelProperty("头像")
  @TableField("avatar")
  private String avatar;

  @ApiModelProperty("电话号码")
  @TableField("phone")
  private String phone;


  @ApiModelProperty("0=后台用户，1=前台用户")
  @TableField("type")
  private Integer type;

  @ApiModelProperty(value = "是否删除(0=否，1=是)", hidden = true)
  @TableField("is_delete")
  @TableLogic
  private String isDelete;

  @ApiModelProperty("创建时间")
  @TableField(value = "create_time", fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createTime;

  @ApiModelProperty(value = "修改时间", hidden = true)
  @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date updateTime;
}
